import request from '@/utils/request'

// @Tags api
// @Summary 获取用户列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "用户登录"
// @Success 200 {string} json "{"code":0,"data":{},"msg":"获取成功"}"
// @Router /api/showArea/list [post]
export const getShowareaList = (data) => {
  return request({
    url: '/api/showArea/list',
    method: 'Post',
    data
  })
}

// @Tags api
// @Summary 添加展区
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "用户登录"
// @Success 200 {string} json "{"code":0,"data":{},"msg":"获取成功"}"
// @Router /api/showArea/add [post]
export const addShowArea = (data) => {
  return request({
    url: '/api/showArea/add',
    method: 'Post',
    data
  })
}

// @Tags api
// @Summary 编辑展区
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "编辑展区"
// @Success 200 {string} json "{"code":0,"data":{},"msg":"获取成功"}"
// @Router /api/showArea/update [post]
export const updateShowArea = (data) => {
  return request({
    url: '/api/showArea/update',
    method: 'Post',
    data
  })
}

// @Tags api
// @Summary 删除展区
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "删除展区"
// @Success 200 {string} json "{"code":0,"data":{},"msg":"获取成功"}"
// @Router /api/showArea/update [Get]
export const deleteShowArea = (showAreaId) => {
  return request({
    url: `/api/showArea/delete/${showAreaId}`,
    method: 'Get',
  })
}
